/**
 * 
 */
package org.andersonb.prototypes.jpa.entity;

import java.util.List;

import javax.persistence.EntityManager;

/**
 * Interface genérica de DAO.
 * 
 * @author Anderson Bernardo
 */
public interface GenericDAO<T> {

	/**
	 * teste
	 * 
	 * @param entity
	 * @return
	 */
	T save(T entity);

	T update(T entity);

	Boolean delete(Class<T> type, Object entityId);

	T find(Class<T> type, Long entityId);

	List<T> findAll(Class<T> type);
	
	EntityManager getEntityManager();
}
